package net.stogi.unicore.beyond.ui.client.taskeditor.taskoutline;

import net.stogi.unicore.beyond.api.model.InputDefinition;
import net.stogi.unicore.beyond.api.model.InputGroup;

import com.google.gwt.event.shared.GwtEvent;

public class InputDefinitionRemovedEvent extends GwtEvent<InputDefinitionRemovedHandler> {

	public static final GwtEvent.Type<InputDefinitionRemovedHandler> TYPE = new GwtEvent.Type<InputDefinitionRemovedHandler>();

	private InputDefinition inputDefinition;
	
	private InputGroup inputGroup;

	public InputDefinitionRemovedEvent(InputDefinition inputDefinition, InputGroup inputGroup) {
		this.inputDefinition = inputDefinition;
		this.inputGroup = inputGroup;
	}

	@SuppressWarnings("unused")
	private InputDefinitionRemovedEvent() {}

	@Override
	public Type<InputDefinitionRemovedHandler> getAssociatedType() {
		return TYPE;
	}

	public InputDefinition getInputDefinition() {
		return inputDefinition;
	}

	public InputGroup getInputGroup() {
		return inputGroup;
	}

	public void setInputDefinition(InputDefinition inputDefinition) {
		this.inputDefinition = inputDefinition;
	}

	public void setInputGroup(InputGroup inputGroup) {
		this.inputGroup = inputGroup;
	}

	@Override
	protected void dispatch(InputDefinitionRemovedHandler handler) {
		handler.onInputDefinitionRemoved(this);
	}
}
